;akae2440 Min_OS
;Author : XingWenpeng
;Date		:	2009-9-12

	AREA Irqhandler, CODE,READONLY

	 
	IMPORT  do_irq
	EXPORT  irq_handler
	
irq_handler
	LDR SP,=0X33000000
	
	sub lr, lr, #4
	STMFD	sp!, {r0-r12, lr}        ; push r0-r12 register file and lr( pc return address )
	STMFD SP!,{R14}^							 ; user mode r14 save
	
	BL	do_irq										 ; goto C handler
	
	LDMFD SP!,{R14}^								; user mode r14
	LDMFD	sp!, {r0-r12, pc}^        ; recover r0-r12 and pc from stack, cpsr also
	
	END

